<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<script type="text/javascript">
    var fieldIds_person = new Array('personId', 'personNICNoId', 'dateOfBirth', "nationalityIdtrue", "nationalityIdfalse",
            'genderList', 'personAddress', 'landPhoneId', 'mobileId', 'emailId', 'annualIncome', 'occupationId');
    $(function() {
        var mode = document.getElementById("edit_mode").value;
        if (mode == 2 || mode == 3 || mode == 4 || mode == 5 || mode == 6 || mode == 8 || mode == 9) {

            disableFields(fieldIds_person);
        }
    });
</script>
<tr>
    <td><s:label value="%{getText('name.label')}" cssClass="mandatory-field"/></td>
    <td colspan="3">

        <s:textarea cssClass=" width-595-px" name="alienation.holder.name" rows="1" id="personId"/>
    </td>
</tr>
<tr>
    <td><s:label value="%{getText('NIC_number.label')}"/></td>
    <td><s:textfield name="alienation.holder.registrationNumberOrNIC" id="personNICNoId"/></td>
    <td><s:label value="%{getText('date_of_birth.label')}" cssClass="mandatory-field"/>
        <s:label value="%{getText('date_format.label')}" cssClass="date-format"/></td>
    <td><s:textfield name="alienation.holder.dateOfBirth" id="dateOfBirth" onclick="selectDate('dateOfBirth')"
                     onKeyPress="return dateNumbersOnly(event,true)"/></td>
</tr>
<tr>
    <td><s:label value="%{getText('gender.label')}"/></td>
    <td><s:select
            headerKey="-1" headerValue="%{getText('select.label')}"
            list="#@java.util.HashMap@{'0':getText('male.label'),'1':getText('female.label')}"
            name="alienation.holder.gender" id="genderList" cssClass="width-180-px"/></td>
    <td><s:label value="%{getText('nationality.label')}" cssClass="mandatory-field"/></td>
    <td><s:label value="%{getText('nationality_is_srilanken.label')}" cssclass="mandatory-field"/>
        <s:radio name="alienation.holder.nationality" id="nationalityId"
                 list="#@java.util.HashMap@{'false':getText('no.label'),'true':getText('yes.label')}"/>
    </td>

</tr>

<tr>
    <td><s:label value="%{getText('address.label')}" cssClass="mandatory-field"/></td>
    <td colspan="3"><s:textarea cssClass="width-595-px" name="alienation.holder.contacts.address"
                                rows="1" id="personAddress"/>
    </td>
</tr>
<tr>
    <td><s:label value="%{getText('telephone.label')}"/></td>
    <td><s:textfield name="alienation.holder.contacts.landPhone" id="landPhoneId"/></td>
    <td><s:label value="%{getText('mobile.label')}"/></td>
    <td><s:textfield name="alienation.holder.contacts.mobile" id="mobileId"/></td>
</tr>
<tr>
    <td><s:label value="%{getText('email.label')}"/></td>
    <td><s:textfield name="alienation.holder.contacts.email" id="emailId"/></td>
    <td><s:label value="%{getText('fax.label')}"/></td>
    <td><s:textfield id="fax" name="alienation.holder.contacts.fax" cssClass="width-200-px"/>
</tr>
<tr>
    <td><s:label value="%{getText('name_of_spouse.label')}"/></td>
    <td colspan="3"><s:textfield id="spouse" name="alienation.holder.spouse" cssClass="width-595-px" rows="1"/></td>
</tr>
<tr>
    <td><s:label value="%{getText('occupation.label')}"/></td>
    <td><s:textfield name="alienation.holder.designation" id="occupationId"/></td>
    <td><s:label value="%{getText('annual_income.label')}" cssClass="mandatory-field"/></td>
    <td><s:textfield name="alienation.holder.annualIncome" id="annualIncome"
                     onKeyPress="return numbersonly(event,true)"/></td>
</tr>
<s:include value="childrenDetails.jsp"/>
<%--<s:if test="alienationType==1 || alienationType==2">

</s:if>--%>
<s:hidden id="child-name" value="%{getText('name.label')}"/>
<s:hidden id="child-dob" value="%{getText('date_of_birth.label')}"/>
<s:hidden id="is-disable" value="%{getText('isDisable.label')}"/>
<s:hidden id="yesId" value="%{getText('yes.label')}"/>
<s:hidden id="noId" value="%{getText('no.label')}"/>